<?php

namespace app\common\service;


use think\Db;

class ServerUpdate extends BaseService
{
    /**
     * @name 查询数据
     * @param $condition
     * @param string $field
     * @return array|null|\PDOStatement|string|\think\Model
     * @author wx
     * @date 2019/11/7 15:02
     */
    public function findData($condition, $field = '*')
    {
        return Db::name('server_update')->field($field)->where($condition)->find();
    }

    /**
     * @name 修改
     * @param $condition
     * @param $updateData
     * @return int|string
     * @author wx
     * @date 2019/11/7 15:04
     */
    public function modify($condition, $updateData)
    {
        return Db::name('server_update')->where($condition)->update($updateData);
    }

    /**
     * @name 添加
     * @param $addData
     * @return int|string
     * @author wx
     * @date 2019/11/7 15:06
     */
    public function add($addData)
    {
        return Db::name('server_update')->insert($addData);
    }
}